﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace new和override区别
{
    public class GrandClass//基类
    {
        public GrandClass()
        {
            Console.WriteLine("In GrandClass.Constructor");
        }

        public virtual void Method()//用virtual才可以在子类中用override,而new不需要这样
        {
            Console.WriteLine("In GrandClass.Method()");
        }
    }
}
